//因为Key要保持一致，用常量
const TOKEN_KEY = 'hmtt1'
//存token
export const setToken = obj => {
  localStorage.setItem(TOKEN_KEY, JSON.stringify(obj))
}
//取token
export const getToken = () => {
  return JSON.parse(localStorage.getItem(TOKEN_KEY))
}
//移除token
export const removeToken = () => {
  localStorage.removeItem(TOKEN_KEY)
}